<template>
	<view class="point">
		<view class="dataList" v-for="(item,index) in dataList" :key="item.id" @click="handleselect(item)">
			<image :src="item.image" style="width: 120rpx;height: 120rpx;border-radius: 10rpx;" mode=""></image>
			<view class="" style="flex: 1;">
				<view class="top">
					<view class="">
						{{item.name}}
					</view>
					<view class="" style="margin-left: 30rpx;">
						{{item.phone}}
					</view>
				</view>
				<view class="heng"></view>
				<view class="bottom">
					{{item.address}}
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	import {
		selfpickuppoint
	} from "@/api/api.js"
	import {
		methods
	} from "uview-ui/libs/mixin/mixin"
	export default {
		data() {
			return {
				page: 1,
				page_size: 10,
				dataList: [],
			}
		},
		onLoad() {
			this.handleselfpickuppoint()
		},
		methods: {
			async handleselfpickuppoint() {
				let res = await selfpickuppoint({
					page: this.page,
					page_size: this.page_size
				})
				this.dataList = res.data.data
			},
			handleselect(item) {
				uni.setStorageSync('point', item)
				uni.navigateBack({
					delete: 1
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.point {
		.dataList {
			width: 100%;
			height: 150rpx;
			background-color: #ffffff;
			padding: 30rpx;
			margin: 10rpx 0;
			box-sizing: border-box;
			display: flex;
			align-items: center;
			margin-left: 10rpx;

			.top {
				display: flex;
				align-items: center;

				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #333333;
				line-height: 33rpx;
				text-align: left;
				font-style: normal;
				text-transform: none;
				margin-bottom: 20rpx;
			}

			.heng {
				width: 100%;
				height: 1rpx;
				background-color: #F5F5F5;
			}

			.bottom {
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #999999;
				line-height: 28rpx;
				text-align: left;
				font-style: normal;
				text-transform: none;
				margin-top: 20rpx;
			}
		}
	}
</style>